Honor CLI output formats and reject unsupported snapshot options - #1852
Open
patch-goblin[bot] wants to merge 3 commits into
Open
Honor CLI output formats and reject unsupported snapshot options#1852patch-goblin[bot] wants to merge 3 commits into
patch-goblin[bot] wants to merge 3 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1852 +/- ##
==========================================
+ Coverage 66.18% 66.79% +0.61%
==========================================
Files 43 43
Lines 8451 8456 +5
==========================================
+ Hits 5593 5648 +55
+ Misses 2858 2808 -50
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jtran
reviewed
Sep 10, 2026
Preserve exhaustive matching for API file conversion fields Co-authored-by: Patch Goblin <patch-goblin@users.noreply.github.com>
jtran
marked this pull request as ready for review
September 10, 2026 16:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Request
Fix the ignored CLI flags reported in #1748.
Closes #1748.
Changes
--formatand configured JSON/YAML/table output forkcl bounding-box, preserving the existing row structure and unit conversions.api-call status, including completed file conversions. Keep download notices on stderr for structured output and omit already-saved base64 payloads. Render real API status fields in table mode rather than the SDK enum's variant-only table.--formatflags fromkcl export,kcl snapshot, andkcl view; their actual CAD/image--output-formatoptions are unchanged.--angle,--camera-style,--camera-padding,--replay,--allow-errors,--show-trace). Reject non-PNG output, whether explicit or inferred, before reading the input or contacting the session. Preserve inferred and explicit PNG snapshots with the server's fixed rendering settings.Validation
Using the repository's pinned Nix development shell (Rust 1.98.1):
cargo test --locked --test output_formats: six tests pass, exercising the real CLI against local HTTP/WebSocket servers. Covers format/config precedence, unit conversion, status fields, completed downloads, unsupported flags, and PNG session behavior.main: five expected failures; the supported PNG control passed. Both independent reviewers inspected the code and before/after results; their table-rendering finding was fixed and covered by stronger assertions.cargo clippy --locked --all-features --all-targets -- -D warnings: passes (the repository'sjust lintcommand, with a locked dependency graph).cargo fmt -- --checkandgit diff --check: pass.Compatibility and limits
Previously ignored switches now fail explicitly.
api-call statusnow honors the normal configured/default format (table); callers requiring JSON should request--format json. Custom rendering and JPEG remain available without--session; no session-server protocol or dependency changes are needed.Validation uses local protocol fixtures, not a live modeling engine. No merge or deployment is included.